#include<bits/stdc++.h>
using namespace std;
#define mm(a) memset(a, 0, sizeof(a))
const int MAXN = 3000;
typedef long long ll;
ll dp[MAXN];
bool isPrime(int n) {
    if (n <= 3) {
        return n > 1;
    }
    for (int i = 2; i < n; i++) {
        if (n % i == 0) {
            return false;
        }
    }
    return true;
}

int main() {
    vector<ll> vec;
    for (ll i = 1; i <= 2019; i++) {
        if (isPrime(i)) vec.push_back(i);
    }
    mm(dp);
    dp[0] = 1;
    cout << vec.size() << endl;
    // 遍历所有的质数
    for (int i = 0; i < vec.size(); i++) {
        // vec[i] = 2
        for (int j = 2019; j >= vec[i]; j--) {
            // dp[2019] = dp[2019] + dp[2017];
            dp[j] += dp[j - vec[i]];
        }
    }
    cout << dp[2019] << endl;
    return 0;
}